< previous page page_580 next page >

Page 580
Because they are created using the Visual Basic IDE, you immediately have several advantages, including the following:
All of your Visual Basic expertise can be applied to creating ActiveX documents.
You can design your Internet application using the Visual Basic design environment.
You also have access to Visual Basic's debugging environment for testing the code and fixing any problems.
The available Hyperlink object makes it easy to navigate to other pages from the browser.
So, Visual Basic makes it easy to create an ActiveX document, but why create one instead of just creating a standard application? The answer, if you don't already know it, is the Internet. ActiveX documents take you away from the standard distribution methods that you have already learned how to use. If you stay with a standard application design, you need to use disks or CD-ROMs to distribute your application. However, with ActiveX documents, you can set up your application to be downloaded from a Web browser when the user opens a specific Web page. Using HTML codes embedded in the Web page instructs Internet Explorer to download a cabinet (.CAB) file to the user's PC. This file will contain all of the necessary files and components that your application needs to execute properly. This approach makes it very easy for you to maintain the application code and keep everyone running the same version.
Note
When creating any type of application for the Internet that will give browsers access to data, you need to consider what security options you might have available to you for the Internet.

Creating a New ActiveX Document
Creating an ActiveX document is much the same as creating a standard Visual Basic application. However, there are a few things that make it different. To better understand how to work with an ActiveX document project, you will create a small, fairly simple ActiveX document application and then execute it on your Web browser. You will see from the exercise that everything you learned so far about using Visual Basic is still applicable.
Starting an ActiveX Document Project
The first step in creating any ActiveX document is to start a new project in Visual Basic. Then from the New Project dialog box, select the ActiveX Document .EXE by doubleclicking the icon. This opens the new project and displays a blank UserDocument form on the screen, as shown in Figure 21.2.

 
< previous page page_580 next page >

If you like this book, buy it!